# 封装 ihrm 接口对象层
import requests


class IhrmLoginAPI(object):
    @classmethod
    def login(cls, req_body):
        resp = requests.post(url="http://ihrm-test.itheima.net/api/sys/login",json=req_body)
        return resp

if __name__ == '__main__':
    req_data= {"mobile": "13800000002", "password": "123456"}
    resp = IhrmLoginAPI.login(req_data)
    print("登录结果：", resp.json())

    print("登录响应状态码：",resp.status_code)
